Solenoid valves of this type for controlling a fluid are known from the prior art in different embodiments, in particular for example as outlet valves for ABS/TCS/ESP devices in motor vehicles. These solenoid valves have an armature which is arranged in an axially movable fashion in a valve casing. A relatively large gap, which permits fluid to flow between a lower armature space and an upper armature space when the solenoid valve is actuated, is provided here between the armature and the valve casing. However, the large gap results in a significant adverse effect on the electromagnetic functionality of the solenoid valve.